package com.hbx.constant;

import lombok.Getter;
import lombok.Setter;

/*
 * @Author:hbx
 *
 * */
public enum ReportResultEnum {
    REMOVE_RESOURCE(1,"删贴"),
    REMOVE_RESOURCE_AND_WARN(2,"删帖并警告用户"),
    BIN_USER_ACCOUNT(3,"删帖并封禁用户账号"),
    REPORT_INVALID_AND_REJECT(4,"举报无效并驳回")
    ;

    @Setter
    @Getter
    private Integer code;

    @Setter
    @Getter
    private String result;

    ReportResultEnum(Integer code,String result){
        this.code = code;
        this.result = result;
    }

    /**
     * 获得处理结果
     * @param code
     * @return
     */
    public static String ReportResult(Integer code){
        ReportResultEnum[] resultEnums = ReportResultEnum.values();
        for (ReportResultEnum resultEnum : resultEnums) {
            if (resultEnum.getCode().equals(code)){
                return resultEnum.getResult();
            }
        }
        return null;
    }
}
